﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// MauSuatAn Repository. Good example of CRUD operations.
    ///// </summary>
    public class MauSuatAnRepository : IMauSuatAnRepository
    {
        private static readonly IMauSuatAnDao _mauSuatAn = DataAccess.MauSuatAnDao;
        public List<MauSuatAn> GetList()
        {
            return _mauSuatAn.GetMauSuatAn().ToList();
        }

        public MauSuatAn Get(string id)
        {
            return _mauSuatAn.GetMauSuatAnByID(id);
        }

        public void Insert(MauSuatAn t)
        {
            _mauSuatAn.InsertMauSuatAn(t);
        }

        public void Update(MauSuatAn t)
        {
            _mauSuatAn.UpdateMauSuatAn(t);
        }

        public void Delete(MauSuatAn t)
        {
            _mauSuatAn.DeleteMauSuatAn(t);
        }
    }
}